Skip to content

chore: add minimal solhint config#13

Open
igorroncevic wants to merge 2 commits intomainfrom
pr-03-solhint
Open

chore: add minimal solhint config#13
igorroncevic wants to merge 2 commits intomainfrom
pr-03-solhint

Conversation

@igorroncevic
Copy link
Copy Markdown
Contributor

@igorroncevic igorroncevic commented May 6, 2026

Description

Add a small Solhint setup that uses the local Solhint dependency.

Context

The root Solhint config extends solhint:recommended and only adds the intentional rules. The script and test folders have small override configs for their own style.

Out of Scope

This PR does not add Slither, Justfile commands, CI, or hooks.

Testing Instructions

  • Merge PR chore: add local dependencies #11 first.
  • Run npm install --prefix dev.
  • Run dev/node_modules/.bin/solhint --max-warnings 0 'src/**/*.sol'.
  • Run dev/node_modules/.bin/solhint --max-warnings 0 'script/**/*.sol'.
  • Run dev/node_modules/.bin/solhint --max-warnings 0 'test/**/*.t.sol'.

@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 6, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedsolhint@​6.0.39710010088100

View full report

This was referenced May 6, 2026
@igorroncevic igorroncevic marked this pull request as ready for review May 6, 2026 20:37
@igorroncevic igorroncevic requested a review from a team as a code owner May 6, 2026 20:37
Copy link
Copy Markdown

@kaze-cow kaze-cow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of coding standards enforcement good to see.

Copy link
Copy Markdown
Contributor

@fedgiac fedgiac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, mostly minor comments.
Approving is blocked because there are changes belonging to PR 2 and I expect this to change once upstream PRs are merged.

Comment thread script/.solhint.json Outdated
Comment thread test/.solhint.json Outdated
Comment thread test/.solhint.json Outdated
Comment thread script/.solhint.json Outdated
Comment thread .solhint.json
Comment thread README.md Outdated
@igorroncevic igorroncevic requested review from anxolin and fedgiac May 8, 2026 11:46
@fedgiac
Copy link
Copy Markdown
Contributor

fedgiac commented May 8, 2026

Looks good! Can be merged once the previous PR is merged.

Copy link
Copy Markdown
Contributor

@anxolin anxolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly ok, but a few comments. The PR description says "and only adds the intentional rules", but I believe your config is not adding but replacing the rules

Comment thread README.md

```shell
npm install --prefix dev
python -m venv dev/.venv
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to change for Mac users, but just so you know, we need to use python3

Comment thread README.md
```shell
npm install --prefix dev
python -m venv dev/.venv
dev/.venv/bin/pip install -r dev/requirements.txt
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no such a file dev/requirements.txt

Comment thread README.md

```shell
dev/node_modules/.bin/solhint --version
dev/.venv/bin/slither --version
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible you are mixing things from another PR?
This PR is about solhint, but here you are stuff from slither, even though it explicitly says its out of scope

Comment thread README.md
forge fmt
```

### Local tooling
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find the section a bit stange.

We have Build, Test, Format, so if you add solint makes sense in a section called Lint

Local tooling is also cast

Comment thread dev/package.json
"description": "Local development dependencies for the contracts template.",
"license": "UNLICENSED",
"devDependencies": {
"solhint": "6.0.3"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this version and not 6.2.1?

When I run the command I get this warning

Image

Comment thread script/.solhint.json
@@ -0,0 +1 @@
{}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this file here?

Comment thread test/.solhint.json
@@ -0,0 +1,6 @@
{
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this does what you intended.

You want to extend and override, right?
{ "extends": "../.solhint.json" }

Suggested change
{
{
"extends": "../.solhint.json" ,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants